//
//  DHListCell.m
//  NavigationDemo
//
//  Created by 商广硕 on 2022/7/10.
//

#import "DHListCell.h"

#import "DHButton.h"
@implementation DHListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
// 纯代码添加自定义的cell，子类会重写父类的initWithStyle方法用来初始化cell的样式
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];

    if (self) {
        UIImageView *imgView  = [[UIImageView alloc] init];
        imgView.frame = CGRectMake(10, 10, 60, 60);
        [imgView setImage:[UIImage imageNamed:@"image_face_eye"]];
        [self.contentView addSubview:imgView];
        
        UILabel *text = [[UILabel alloc] init];
        text.frame = CGRectMake(100,10 ,150, 20);
        [self.contentView addSubview:text];
        _msg = text;
        ;
        DHButton *customerButton = [[DHButton alloc] initWithFrame:CGRectMake(self.contentView.bounds.size.width-65, 10, 60, 40)];
            customerButton.customTitle = @"点击";
            customerButton.customRadius=4;
            customerButton.customBorderColorr = [UIColor redColor];
        [self.contentView addSubview:customerButton];
        
        _messageBtn =customerButton;
        
        
    }
    return self;

}

@end
